import { Application } from 'egg';

export default (app: Application) => {
  const { controller, router } = app;

  router.get('/auth/getUserInfo', controller.auth.getUserInfo)
  router.post('/auth/login', controller.auth.login)
  router.post('/auth/register', controller.auth.register)

  router.get('/pets', controller.pet.index)
  router.get('/pets/del', controller.pet.destroy)
  router.post('/pets/new', controller.pet.new)
  router.post('/pets/update', controller.pet.update)

  router.get('/users', controller.user.index)
  router.get('/users/del', controller.user.destroy)
  router.post('/users/new', controller.user.new)
  router.post('/users/update', controller.user.update)

};
